package repository

import (
	"cart1/initialize"
	"cart1/model"
)

func Login(mobile string, password string) (user *model.User) {
	err := initialize.DB.Where("mobile=?", mobile).Where("password=?", password).Find(&user).Error
	if err != nil {
		return nil
	}
	return user
}
